package com.szh.dongtaijieshou;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;

public class TestBroadcast extends BroadcastReceiver {


    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction()=="com.szh.dongtaijieshou") {
            String str  = intent.getStringExtra("msg");
            Log.d("CustomStaticBroadcast", str);
            Toast.makeText(context, str+"动态接收成功", Toast.LENGTH_SHORT).show();
        }
    }
}
